<%= form_for(@article) do |f| %>
  <% if @article.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@article.errors.count, "error") %> prohibited this article from being saved:</h2>

      <ul>
      <% @article.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :title %><br />
    <%= f.text_field :title %>
  </div>
  <div class="field">
    <%= f.label :body %><br />
    <%= f.text_area :body %>
  </div>
  <div class="field">
    <%= f.label :start_publishing %><br />
    <%= f.datetime_select :start_publishing %>
  </div>
  <div class="field">
    <%= f.label :finish_publishing %><br />
    <%= f.datetime_select :finish_publishing %>
  </div>
  <div class="field">
    <%= f.label :alias %><br />
    <%= f.text_field :alias %>
  </div>
  		<%= f.label :Status %><br />
	<select name="article[status_id]" >
		<% @status.each do |status| %>
			<option value= <%= status.id %> > <%= status.name %></option>
		<% end %>
    </select><br>
	
		<%= f.label :AccessLevel %><br>
  <select name="article[access_level_id]" >
		<% @access_level.each do |access_level| %>
			<option value= <%= access_level.id %> > <%= access_level.name %></option>
		<% end %>
 </select><br>
 
  		<%= f.label :User_Name %><br>
  <select name="article[user_id]" >
		<% @user.each do |user| %>
			<option value= <%= user.id %> > <%= user.username %></option><br />		
		<% end %>
  </select> <br>
  
  		<%= f.label :Event %><br />		
  <select name="article[event_id]" >
		<% @event.each do |event| %>
			<option value= <%= event.id %> > <%= event.name %></option><br />		
		<% end %>
  </select> <br>

  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
